package com.qf.mapper;

import com.qf.model.Device;
import com.qf.model.TProducter;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ProducterMapper {

    public int add(TProducter tProducter);

    public TProducter findById(@Param("id") int id);

    public int edit(TProducter tProducter);

    public int delete(@Param("id") int id);

    //当前页结果
    public List<TProducter> findPage(@Param("currentPage")Integer currentPage, @Param("pageSize")Integer pageSize, @Param("queryString")String queryString,@Param("userId")Integer userId);


    //总记录数
    public Long count(String queryString,@Param("userId")Integer userId);

    //获取设备id集合
    public List<TProducter> getAllProducter();


    @Select("select * from tproducter where username=#{username}")
    public TProducter findByName(String username);


}
